package org.xtremeobjects.forms.core;

import org.xtremeobjects.forms.definition.FieldDefinition;

public class Field {

	private Form parentForm;

	private FieldDefinition fieldDefinition;

	public void setFieldDefinition(FieldDefinition fieldDefinition) {
		this.fieldDefinition = fieldDefinition;
	}

	public FieldDefinition getFieldDefinition() {
		return fieldDefinition;
	}

	public String getName() { return getFieldDefinition().getName(); }

	public String getDescription() { return getFieldDefinition().getDescription();  }

	public String getHelp() { return getFieldDefinition().getHelp(); }

	protected void setParentForm(Form parentForm) {
		this.parentForm = parentForm;
	}

	protected Form getParentForm() {
		return parentForm;
	}

}
